# @Time:        2024/7/4 下午2:36
# @USER:        lihuizhuo
# @Site:        www.swust.edu.cn
# @File:        demo-test
# @Software:    PyCharm
# @license:     Copyright(C), swust
# @Author:      huizhuo
# @Email:       huizhuoli@foxmail.com
# @Version:     V1.1.0


# # 第一个注释
# print("Hello, Python!")  # 第二个注释
#
#
# def hello():
#     """
#     hello world
#     :return: 6
#     """
#     print("Hello World!")
#     return 6
#
#
# hello()
def func():
    """
    测试一个循环的方法
    :return:
    """
    n = 100
    sum = 0
    counter = 1
    while counter <= n:
        sum = sum + counter
        counter += 1

    print("1 到 %d 之和为: %d" % (n, sum))


func()
